package com.mall.shop;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.Arrays;

@EnableFeignClients(basePackages = {"com.mall.shop.feign"})
@EnableDiscoveryClient
@SpringBootApplication
public class AuthServerApplication {
    public static void main(String[] args) {
//        SpringApplication.run(AuthServerApplication.class,args);

//        SpringApplication.run(AuthServerApplication.class, args);
//        SpringApplication application = new SpringApplication(AuthServerApplication.class);
//        WebApplicationType applicationType = application.getWebApplicationType();
//        application.getSources().forEach(source -> {
//            System.out.println("【AuthServerApplication】获取的source的值：" + source);
//        });
//       application.getAllSources().forEach(source -> {
//           System.out.println("【getAllSources】 中的数据：" + source);
//       });
//
        ConfigurableApplicationContext applicationContext = SpringApplication.run(AuthServerApplication.class, args);
        Arrays.asList(applicationContext.getBeanDefinitionNames()).forEach(name -> {
            System.out.println("【applicationContext】中所有的bean：" + name);
        });



    }
}